package hu.mapro.gwtui.client.action;

import hu.mapro.gwtui.client.Action;

import java.util.List;

import com.google.common.collect.Lists;

public class Publisher {

	List<Action> actions = Lists.newArrayList();
	
	public boolean remove(Action action) {
		return actions.remove(action);
	}

	public void add(Action action) {
		actions.add(action);
	}
	
	public void fire() {
		for (Action a : actions) {
			a.perform();
		}
	}
	
}
